<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/axios-0.18.0.js"></script>
</head>
<body>
<input type="text" name="username" id="wuhu"> <span id="msg"></span><br>
<input type="submit">


<script>

    document.getElementById("wuhu").onblur=function () {
        var username = this.value;
    axios({
        method:"get",
        url:"http://localhost:8080/Filter-demo/ajaxTest3?username" + username
    }).then(function (resp) {
        if (resp.data == true){
            document.getElementById("msg").innerHTML = "用户名已存在";
        }
        // alert(resp.data);
    })
    }


</script>

</body>
</html>